package czy.demo.util;

import com.fasterxml.jackson.databind.ObjectMapper;

public class JsonUtil {

    private static final ObjectMapper objectMapper = new ObjectMapper();

    public static String toJson(Object obj){
        try {
            return objectMapper.writeValueAsString(obj);
        }catch (Exception ex){
            return null;
        }
    }


}
